package com.neusoft.mapper;


import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.neusoft.po.Token;


@Mapper
public interface AuthMapper {
	@Insert("insert into tokens values(#{tokenId},#{userId},#{token},#{timeGenerated},#{valid})")
    public void saveToken(Token T);

	@Select("select * from tokens where token=#{token} and valid=1" )
	public List<Token> getToken(String token);
}
